package com.jbit.redis.api;

import com.jbit.common.RedisEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(name = "redis-server")
public interface RedisAPI {
    @RequestMapping("/redis/set")
    void set(@RequestBody RedisEntity redisEntity);

    @RequestMapping("/redis/get")
    String get(@RequestBody RedisEntity redisEntity);

    @RequestMapping("/redis/del")
    boolean del(@RequestBody RedisEntity redisEntity);

    @RequestMapping("/redis/exists")
    boolean exists(@RequestBody RedisEntity redisEntity);
}
